<!DOCTYPE html>
<html>
    <head>
        <meta name="layout" content="main" />
        <g:set var="entityName" value="${message(code: 'employee.label', default: 'Employee')}" />
        <title>新增员工信息</title>
    </head>
    <body class="fixed-navbar fixed-sidebar">
    <div class="small-header">
        <div class="hpanel">
            <div class="panel-body">
                <div id="hbreadcrumb" class="pull-right">
                    <ol class="hbreadcrumb breadcrumb">
                        <li>Next CRM</li>
                        <li><g:link controller="employee" action="index">员工信息</g:link></li>
                        <li class="active">
                            <span>新增员工信息</span>
                        </li>
                    </ol>
                </div>
                <h2 class="font-light m-b-xs">新增员工信息</h2>
            </div>
        </div>
    </div>
    <div class="content animate-panel">
        <div class="row">
            <div class="hpanel hblue">
                <div class="panel-heading">
                    新增员工信息
                </div>
                <div class="panel-body">
                    <g:if test="${flash.message}">
                        <div class="message alert alert-info" role="status">
                            <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span
                                    aria-hidden="true">×</span></button>
                        </div>
                    </g:if>
                    <g:hasErrors bean="${this.employee}">
                        <ul class="errors" role="alert">
                            <g:eachError bean="${this.employee}" var="error">
                                <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>><g:message error="${error}"/></li>
                            </g:eachError>
                        </ul>
                    </g:hasErrors>

                    <g:form action="save" class="form-horizontal">
                        <div class="form-group row">
                            <label class="col-md-3 control-label">姓名</label>
                            <div class="col-md-4">
                                <g:textField class="form-control" type="text" name="fullName" id="fullName" value="${this.employee.fullName}"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-3 control-label">手机</label>
                            <div class="col-md-4">
                                <g:textField class="form-control" type="text" name="cellphone" id="cellphone" value="${this.employee.cellphone}"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-3 control-label">性别</label>
                            <div class="col-md-4">
                                <g:select class="form-control" name="gender" noSelection="${['':'请选择']}" from="${this.employee.constrainedProperties.gender.inList}" valueMessagePrefix="gender" value="${this.employee.gender}"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-3 control-label">生日</label>
                            <div class="col-md-4">
                                <g:datePicker class="form-control" name="birthday" id="birthday" value="${new Date()}" precision="day" years="${1990..2050}"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-3 control-label">身份证</label>
                            <div class="col-md-4">
                                <g:textField class="form-control" type="text" name="idNumber" id="idNumber" value="${this.employee.idNumber}"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-3 control-label">上级</label>
                            <div class="col-md-4">
                                <g:select class="form-control" noSelection="${['':'请选择']}" name="manager" id="manager" optionKey="id" optionValue="fullName" from="${com.next.Employee.list()}" value="${this.employee.manager}"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-3 control-label">externalId</label>
                            <div class="col-md-4">
                                <g:textField class="form-control" type="text" name="externalId" id="externalId" value="${this.employee.externalId}"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-3 control-label">company</label>
                            <div class="col-md-4">
                                <g:select class="form-control" noSelection="${['':'请选择']}" name="company" id="company" optionKey="id" optionValue="name" from="${com.next.Company.list()}" value="${this.employee.company}"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-3 control-label">createBy</label>
                            <div class="col-md-4">
                                <g:select class="form-control" noSelection="${['':'请选择']}" name="createBy" id="createBy" optionKey="id" optionValue="fullName" from="${com.next.User.list()}" value="${this.employee.createBy}"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-3 control-label">createBy</label>
                            <div class="col-md-4">
                                <g:select class="form-control" noSelection="${['':'请选择']}" name="user" id="user" optionKey="id" optionValue="fullName" from="${com.next.User.list()}" value="${this.employee.createBy}"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>
                        <div class="form-group row">
                            <label class="col-md-3 control-label">modifyBy</label>
                            <div class="col-md-4">
                                <g:select class="form-control" noSelection="${['':'请选择']}" name="modifyBy" id="modifyBy" optionKey="id" optionValue="fullName" from="${com.next.User.list()}" value="${this.employee.modifyBy}"/>
                            </div>
                        </div>
                        <div class="hr-line-dashed"></div>

                        <div class="form-group row">
                            <div class="col-md-7">
                                <g:submitButton class="btn btn-info" name="save" value="保存"/>
                            </div>
                        </div>
                    </g:form>
                </div>
            </div>
        </div>
    </div>
    </body>
</html>



<!DOCTYPE html>
<html>

<head>
    <meta name="layout" content="main"/>
    <g:set var="entityName" value="${message(code: 'employee.label', default: 'Employee')}"/>
    <title>新增员工信息</title>
</head>

<body class="fixed-navbar fixed-sidebar">
<div class="small-header">
    <div class="hpanel">
        <div class="panel-body">
            <div id="hbreadcrumb" class="pull-right">
                <ol class="hbreadcrumb breadcrumb">
                    <li>Next CRM</li>
                    <li>
                        <g:link controller="employee" action="index">员工信息</g:link>
                    </li>
                    <li class="active">
                        <span>新增员工信息</span>
                    </li>
                </ol>
            </div>

            <h2 class="font-light m-b-xs">
                新增员工信息
            </h2>

        </div>
    </div>
</div>

<div class="content animate-panel">
    <div class="row">
        <g:if test="${flash.message}">
            <div class="message" role="status">${flash.message}</div>
        </g:if>
        <g:hasErrors bean="${this.employee}">
            <ul class="errors" role="alert" style="right: 4%">
                <g:eachError bean="${this.employee}" var="error">
                    <li <g:if test="${error in org.springframework.validation.FieldError}">data-field-id="${error.field}"</g:if>>
                        <g:message error="${error}"/>
                    </li>
                </g:eachError>
            </ul>
        </g:hasErrors>
        <div class="hpanel hblue">
            <div class="panel-heading">
                新增员工信息
            </div>

            <div class="panel-body">
                <g:form action="save" class="form-horizontal">

                    <div class="form-group row">
                        <label class="col-md-2 control-label is-required">姓名</label>
                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="fullName" id="fullName" value="${this.employee.fullName}"/>
                        </div>
                        <label class="col-md-2 control-label is-required">手机</label>

                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="cellphone" id="cellphone" value="${this.employee.cellphone}"/>
                        </div>
                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <label class="col-md-2 control-label">性别</label>
                        <div class="col-md-3">
                            <g:select class="form-control" name="gender" noSelection="${['':'请选择']}" from="${this.employee.constrainedProperties.gender.inList}" valueMessagePrefix="gender" value="${this.employee.gender}"/>
                        </div>

                        <label class="col-md-2 control-label">生日</label>
                        <div class="col-md-3">
                            <g:datePicker class="form-control" name="birthday" id="birthday" value="${new Date()}" precision="day" years="${1990..2050}"/>
                        </div>
                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <label class="col-md-2 control-label is-required">身份证</label>
                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="idNumber" id="idNumber" value="${this.employee.idNumber}"/>
                        </div>

                        <label class="col-md-2 control-label is-required">上级</label>
                        <div class="col-md-3">
                            <g:select class="form-control" noSelection="${['':'请选择']}" name="manager" id="manager" optionKey="id" optionValue="fullName" from="${com.next.Employee.list()}" value="${this.employee.manager}"/>
                        </div>

                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <label class="col-md-2 control-label">externalId</label>
                        <div class="col-md-3">
                            <g:textField class="form-control" type="text" name="externalId" id="externalId" value="${this.employee.externalId}"/>
                        </div>
                        <label class="col-md-2 control-label is-required">公司</label>

                        <div class="col-md-3">
                            <g:select class="form-control" noSelection="${['':'请选择']}" name="company" id="company" optionKey="id" optionValue="name" from="${com.next.Company.list()}" value="${this.employee.company}"/>
                        </div>

                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <label class="col-md-2 control-label is-required">创建人</label>
                        <div class="col-md-3">
                            <g:select class="form-control" noSelection="${['':'请选择']}" name="createBy" id="createBy" optionKey="id" optionValue="fullName" from="${com.next.User.list()}" value="${this.employee.createBy}"/>
                        </div>
                        <label class="col-md-2 control-label is-required">修改人</label>

                        <div class="col-md-3">
                            <g:select class="form-control" noSelection="${['':'请选择']}" name="modifyBy" id="modifyBy" optionKey="id" optionValue="fullName" from="${com.next.User.list()}" value="${this.employee.modifyBy}"/>
                        </div>
                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <label class="col-md-2 control-label is-required">用户</label>

                        <div class="col-md-3">
                            <g:select class="form-control" noSelection="${['':'请选择']}" name="user" id="user" optionKey="id" optionValue="fullName" from="${com.next.User.list()}" value="${this.employee.user}"/>
                        </div>
                    </div>

                    <div class="hr-line-dashed"></div>

                    <div class="form-group row">
                        <div class="col-md-12">
                            <g:submitButton class="btn btn-info" name="create" value="保存"/>
                        </div>
                    </div>
                </g:form>
            </div>
        </div>
    </div>
</div>
</body>
</html>
